import React, { Component, PropTypes } from 'react'
import ExpenseCalendarTable from "containers/expense-report/components/expense-calendar-table";

class SlideExpenseReportDetailExpenseCalendar extends Component {

  static contextTypes = {
    info: PropTypes.object
  };

  render() {
    const {info} = this.context;
    const {invoiceData, filterData, toggleMode} = this.props;
    return (
      <div className='slide-expense-report-detail-expense-calendar'>
        <ExpenseCalendarTable
          dataSource={invoiceData.expenseReportInvoices.map(invoice => invoice.invoiceView)}
          applicant={info.applicantOID}
          filterData={filterData}
          toggleMode={toggleMode}
          baseCurrency={info.baseCurrency}
          maxColumnsNum={5}
        />
      </div>
    )
  }

}

export default SlideExpenseReportDetailExpenseCalendar;
